m = int(input('m = '))
n = 2 ** m

print('     ', end='')
# 表头
for i in range(1, n + 1):
	print(str(i).center(5), end='')

print()

for i in range(1, n + 1):
	print(str(i).center(5), end='')
	for j in range(1, n + 1):
		if i == j:
			print(' \\\\\\ ', end='')
		else:
			print(str(j).center(5), end='')
	print()


print()
